Optimal. Leaf size=74 \[ \frac{b \tanh ^{-1}\left (\frac{b+2 c x^n}{\sqrt{b^2-4 a c}}\right )}{a n \sqrt{b^2-4 a c}}-\frac{\log \left (a+b x^n+c x^{2 n}\right )}{2 a n}+\frac{\log (x)}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0658304, antiderivative size = 74, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.35, Rules used = {1357, 705, 29, 634, 618, 206, 628} \[ \frac{b \tanh ^{-1}\left (\frac{b+2 c x^n}{\sqrt{b^2-4 a c}}\right )}{a n \sqrt{b^2-4 a c}}-\frac{\log \left (a+b x^n+c x^{2 n}\right )}{2 a n}+\frac{\log (x)}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1357
Rule 705
Rule 29
Rule 634
Rule 618
Rule 206
Rule 628
Rubi steps
\begin{align*} \int \frac{1}{x \left (a+b x^n+c x^{2 n}\right )} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1}{x \left (a+b x+c x^2\right )} \, dx,x,x^n\right )}{n}\\ &=\frac{\operatorname{Subst}\left (\int \frac{1}{x} \, dx,x,x^n\right )}{a n}+\frac{\operatorname{Subst}\left (\int \frac{-b-c x}{a+b x+c x^2} \, dx,x,x^n\right )}{a n}\\ &=\frac{\log (x)}{a}-\frac{\operatorname{Subst}\left (\int \frac{b+2 c x}{a+b x+c x^2} \, dx,x,x^n\right )}{2 a n}-\frac{b \operatorname{Subst}\left (\int \frac{1}{a+b x+c x^2} \, dx,x,x^n\right )}{2 a n}\\ &=\frac{\log (x)}{a}-\frac{\log \left (a+b x^n+c x^{2 n}\right )}{2 a n}+\frac{b \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^n\right )}{a n}\\ &=\frac{b \tanh ^{-1}\left (\frac{b+2 c x^n}{\sqrt{b^2-4 a c}}\right )}{a \sqrt{b^2-4 a c} n}+\frac{\log (x)}{a}-\frac{\log \left (a+b x^n+c x^{2 n}\right )}{2 a n}\\ \end{align*}
Mathematica [A] time = 0.115239, size = 74, normalized size = 1. \[ -\frac{\frac{2 b \tan ^{-1}\left (\frac{b+2 c x^n}{\sqrt{4 a c-b^2}}\right )}{n \sqrt{4 a c-b^2}}+\frac{\log \left (a+x^n \left (b+c x^n\right )\right )}{n}-2 \log (x)}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.066, size = 397, normalized size = 5.4 \begin{align*} 4\,{\frac{{n}^{2}\ln \left ( x \right ) ac}{4\,{a}^{2}c{n}^{2}-a{b}^{2}{n}^{2}}}-{\frac{{n}^{2}\ln \left ( x \right ){b}^{2}}{4\,{a}^{2}c{n}^{2}-a{b}^{2}{n}^{2}}}-2\,{\frac{c}{ \left ( 4\,ac-{b}^{2} \right ) n}\ln \left ({x}^{n}-1/2\,{\frac{-{b}^{2}+\sqrt{-4\,a{b}^{2}c+{b}^{4}}}{bc}} \right ) }+{\frac{{b}^{2}}{2\,a \left ( 4\,ac-{b}^{2} \right ) n}\ln \left ({x}^{n}-{\frac{1}{2\,bc} \left ( -{b}^{2}+\sqrt{-4\,a{b}^{2}c+{b}^{4}} \right ) } \right ) }+{\frac{1}{2\,a \left ( 4\,ac-{b}^{2} \right ) n}\ln \left ({x}^{n}-{\frac{1}{2\,bc} \left ( -{b}^{2}+\sqrt{-4\,a{b}^{2}c+{b}^{4}} \right ) } \right ) \sqrt{-4\,a{b}^{2}c+{b}^{4}}}-2\,{\frac{c}{ \left ( 4\,ac-{b}^{2} \right ) n}\ln \left ({x}^{n}+1/2\,{\frac{{b}^{2}+\sqrt{-4\,a{b}^{2}c+{b}^{4}}}{bc}} \right ) }+{\frac{{b}^{2}}{2\,a \left ( 4\,ac-{b}^{2} \right ) n}\ln \left ({x}^{n}+{\frac{1}{2\,bc} \left ({b}^{2}+\sqrt{-4\,a{b}^{2}c+{b}^{4}} \right ) } \right ) }-{\frac{1}{2\,a \left ( 4\,ac-{b}^{2} \right ) n}\ln \left ({x}^{n}+{\frac{1}{2\,bc} \left ({b}^{2}+\sqrt{-4\,a{b}^{2}c+{b}^{4}} \right ) } \right ) \sqrt{-4\,a{b}^{2}c+{b}^{4}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{{\left (c x^{2 \, n} + b x^{n} + a\right )} x}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.60941, size = 590, normalized size = 7.97 \begin{align*} \left [\frac{2 \,{\left (b^{2} - 4 \, a c\right )} n \log \left (x\right ) + \sqrt{b^{2} - 4 \, a c} b \log \left (\frac{2 \, c^{2} x^{2 \, n} + b^{2} - 2 \, a c + 2 \,{\left (b c + \sqrt{b^{2} - 4 \, a c} c\right )} x^{n} + \sqrt{b^{2} - 4 \, a c} b}{c x^{2 \, n} + b x^{n} + a}\right ) -{\left (b^{2} - 4 \, a c\right )} \log \left (c x^{2 \, n} + b x^{n} + a\right )}{2 \,{\left (a b^{2} - 4 \, a^{2} c\right )} n}, \frac{2 \,{\left (b^{2} - 4 \, a c\right )} n \log \left (x\right ) + 2 \, \sqrt{-b^{2} + 4 \, a c} b \arctan \left (-\frac{2 \, \sqrt{-b^{2} + 4 \, a c} c x^{n} + \sqrt{-b^{2} + 4 \, a c} b}{b^{2} - 4 \, a c}\right ) -{\left (b^{2} - 4 \, a c\right )} \log \left (c x^{2 \, n} + b x^{n} + a\right )}{2 \,{\left (a b^{2} - 4 \, a^{2} c\right )} n}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{{\left (c x^{2 \, n} + b x^{n} + a\right )} x}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]